<?php
require 'init.php';
$str_entry_ids = $argv[1];
$entry_ids  = explode(',', $str_entry_ids);
$comment_db = new Core_Model_DbTable_Comments();

$comment_details = $comment_db->getDetail($entry_ids);

$user_actions_db = new Core_Model_DbTable_UserActions();
$user_actions_db->insertActions($comment_details, COMMENT);

$total_actions_db = new Core_Model_DbTable_TotalActions();
$total_actions_db->insertActions($comment_details, COMMENT);

$buffer_comment_db = new Core_Model_DbTable_BufferComments();
$buffer_comment_db->deleteBatch($entry_ids);
?>
